<%--
  Created by IntelliJ IDEA.
  User: 张国庆
  Date: 2019/9/18
  Time: 19:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>日志管理系统</title>
    <link href="layui/css/layui.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="layui/layui.js"></script>
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>
    <script type="text/javascript">
        layui.use(["layer","form","table"],function () {
            var layer=layui.layer;
            var table=layui.table;
            var form=layui.form;
            table.render({
                elem:"#myTable",
                url:"log/showPageLog",
                page:true,
                cols:[[
                    {title:"日志编号",field:"id"},
                    {title:"管理员编号",field:"aid"},
                    {title:"访问日期",field:"logDate"},
                    {title:"访问内容",field:"content"},
                    {title:"访问类型",field:"type"},
                    {title:"IP地址",field:"ip"}
                ]]
            })
        })
        function search() {
            var type=$("#searchT").val();
            layui.use(["table","layer","form"],function () {
                var table=layui.table;
                table.reload("myTable",{
                    where:{"type":type}
                })
            })
        }
    </script>
</head>
<body>


<div class="layui-inline" id="search">
    <label class="layui-form-label">查询名称</label>
    <div class="layui-input-inline" style="width: 200px;">
        <input type="text" class="layui-input" id="searchT">
    </div>
    <div class="layui-input-inline" style="width: 100px;">
        <button type="button" class="layui-btn layui-btn-normal" onclick="search()">
            <i class="layui-icon layui  -icon-search"></i> 搜索
        </button>
    </div>
</div>
<table id="myTable"></table>
</body>
</html>
